package com.my.testerbaoshenconsumer.demos.web;

import com.lingtianyu.erbaoshen.test.demo.DemoService;
import com.lingtianyu.erbaoshen.test.demo.DemoService2;
import com.lingtianyu.erbaoshen.test.demo.model.TestReq;
import com.lingtianyu.erbaoshen.test.demo.model.TestResp;
import com.lingtianyu.tech.erbaoshen.core.consumer.bean.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RestController
public class TestController {
    @Reference
    private DemoService demoService;
    @Autowired
    private DemoService2 demoService2;

    @GetMapping("/test")
    public void test(){
        demoService.test1();
        TestResp[] testResps = demoService.test5(1, true, 1L, 1F, 1.1, new Date(), (short) 1, (byte) 1, "sss", 'c');
        System.out.println(testResps);
        List<TestResp> testResps1 = demoService.test4(new TestReq());
        System.out.println(testResps1);

        demoService2.test(new TestReq());
    }
}
